use tokio::{
    task::spawn,
    time::sleep
};

use std::{time::Duration, future::Future};


#[tokio::main]
async fn main() {
    let sell = sellpus();
    println!("123");
    // let _ = sellpus_test();
    println!("234");
    sleep(Duration::from_secs(2_u64)).await;
    // sell.await
}


async fn sellpus() {
    for i in 0..10 {
        println!("sellp{}", i);
        sleep(Duration::from_secs(2_u64)).await;
    }
}

fn sellpus_test() -> impl Future<Output = ()> {
    async {
        println!("456")
    }
}

async fn interruptus() {
    for i in 0..10 {
        println!("interruptus{}", i);
        sleep(Duration::from_secs(2_u64)).await;
    }
}